package com.xerokhan.diary.util;

import java.util.HashMap;

public class GenUrlConstant {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String[] url = { "notes", "thoughts", "links", "camshots", "videos", "todos", "contacts", "money", "goals" };
		for (int i = 0; i < url.length; i++) {
			System.out.println("String " + url[i].toUpperCase() + "_URL = \"/jsp/" + url[i] + "/visit.jsp\";");
			System.out.println("String " + url[i].toUpperCase() + "_ADD_URL = \"/jsp/" + url[i] + "/add.jsp\";");
			System.out.println("String " + url[i].toUpperCase() + "_UPDATE_URL = \"/jsp/" + url[i] + "/update.jsp\";");
			System.out.println("String " + url[i].toUpperCase() + "_DELETE_CONFIRM_URL = \"/jsp/" + url[i] + "/delete-confirm.jsp\";");
			System.out.println("String " + url[i].toUpperCase() + "_DELETE_DONE_URL = \"/jsp/" + url[i] + "/delete-confirm.jsp\";");
			System.out.println();
		}
		
		for (int i = 0; i < url.length; i++) {
			System.out.println("private HashMap<String, String> urlMap = new HashMap<String, String>() {{");
			System.out.println("put(\"visit\",JSPHelperConstants." + url[i].toUpperCase() + "_URL);");
			System.out.println("put(\"add\",JSPHelperConstants." + url[i].toUpperCase() + "_ADD_URL);");
			System.out.println("put(\"updatet\",JSPHelperConstants." + url[i].toUpperCase() + "_UPDATE_URL);");
			System.out.println("put(\"deleteConfirm\",JSPHelperConstants." + url[i].toUpperCase() + "_DELETE_CONFIRM_URL);");
			System.out.println("put(\"deleteDone\",JSPHelperConstants." + url[i].toUpperCase() + "_DELETE_DONE_URL);");
			System.out.println("}};\n");
		
		}
	}
}
